﻿using AutoMapper;
using BW.MesProject.Production.Domain.Dto.Input.Packing;
using BW.MesProject.Production.Domain.Dto.Input.ProductLock;
using BW.MesProject.Production.Domain.Dto.Output.ProductLock;
using BW.MesProject.Production.Domain;
using BW.MesProject.Production.Domain.Dto.Input.WorkOrder;
using BW.MesProject.Production.Domain.Dto.Input.WorkProcess;
using BW.MesProject.Production.Domain.Dto.Output.ProductionReport;
using BW.MesProject.Production.Domain.Model;
using BW.MesProject.Production.Domain.Dto.Output.WorkProess;

namespace BW.MesProject.Production.Host
{
    public class AutoMapperFiles:Profile
    {
        public AutoMapperFiles()
        {
            CreateMap<ProductLockInput, PRODUCTLOCKMODEL>();
            CreateMap<PRODUCTLOCKMODEL, ProductUnLockOutput>();
            CreateMap<PACKINGMODEL, PackingInput>();
            CreateMap<PackingInput, PACKINGMODEL>();
            CreateMap<AddPackingInput, PACKINGMODEL>();
            CreateMap<AddWorkOrderInput, WORKORDERMODEL>();
            CreateMap<UpdateWorkorderInput, WORKORDERMODEL>();
            CreateMap<WORKPROESSMODEL, WorkProessOutput>();
            CreateMap<WorkPorcessInput, WORKPROESSMODEL>().ForMember(x => x.NONUM, c => c.Ignore()).ForMember(x=>x.NUM,c=>c.Ignore());
            CreateMap<PRODUCTIONREPORT, ProductionReportOutput>();
        }
    }
}
